﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SimpleRentz
{
	public partial class CreateServerDialog : Form
	{
		public string Password { get; set; }
		public int Port { get; set; }

		public CreateServerDialog()
		{
			InitializeComponent();

			DialogResult = System.Windows.Forms.DialogResult.Cancel;
		}

		private void btnCancel_Click(object sender, EventArgs e)
		{
			this.Close();
		}

		private void btnStart_Click(object sender, EventArgs e)
		{
			this.Port = (int)numPort.Value;
			this.Password = txtPassword.Text;

			DialogResult = System.Windows.Forms.DialogResult.OK;
			this.Close();
		}

		private void CreateServerDialog_Load(object sender, EventArgs e)
		{
			txtPassword.Text = this.Password;
			numPort.Value = this.Port;
		}
	}
}
